package com.mine.test.graphql;

import com.mine.test.graphql.dataFetcher.ProductDataFetcher;
import com.mine.test.graphql.dataFetcher.UserDataFetcher;
import com.mine.test.model.Product;
import com.mine.test.model.User;
import graphql.annotations.GraphQLDataFetcher;
import graphql.annotations.GraphQLField;
import org.springframework.stereotype.Component;

/**
 * Project Name is testql.
 * User: wwq
 * Date: 2017/6/2
 * Time: 下午2:12
 */
@Component
public class RootQuery {

    @GraphQLField
    @GraphQLDataFetcher(value = ProductDataFetcher.class, args = "id")
    public Product product(Long id) {
        return null;
    }

    @GraphQLField
    @GraphQLDataFetcher(value = UserDataFetcher.class, args = "id")
    public User user(Long id) {
        return null;
    }

}
